﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Web.Mvc;

namespace MvcRags.Core
{
    public static class BasicHtmlHelpers
    {
        public static string GetControllerName(this HtmlHelper htmlHelper)
        {
            return htmlHelper.ViewContext.RouteData.GetRequiredString("controller");
        }

        public static string GetActionName(this HtmlHelper htmlHelper)
        {
            return htmlHelper.ViewContext.RouteData.GetRequiredString("action");
        }
    }
}
